﻿using PAP.Domain.Core.Entities;
using PAP.Domain.UserAccount.ValueObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PAP.Domain.UserAccount.Entities
{
    public class User : Entity
    {
        #region "Fields"
        private string _salt;
        #endregion

        #region "Constructors"
        protected User()
            : base()
        {
            this._salt = "TODO:HASH";
        }

        public User(string login, string password, string firstname, string lastname)
            : this()
        {
            this.Login = login;
            this.Password = password;
            this.Name = new UserName(firstname, lastname);
            this.AddDate = DateTime.UtcNow;
        }
        #endregion

        #region "Properties"
        public virtual string Login { get; protected set; }
        public virtual string Password { get; protected set; }
        public virtual UserName Name { get; protected set; }
        public virtual DateTime AddDate { get; protected set; }
        public virtual DateTime? ModifyDate { get; protected set; }
        #endregion
    }
}
